package com.design.观察者模式;

public class User implements Observer{

	private String name;
	
	public User() {}
	
	public User(String name) {
		this.name = name;
	}
	
	@Override
	public void update(String message) {
		System.out.println(name+" 收到的消息："+message);
	}

	@Override
	public void delete(String message) {
		System.out.println(name+" 收到删除消息 ："+message);
	}
	
	
	public String getName() {
		return name;
	}

}
